Skip to content

Instantly share code, notes, and snippets.

@soulthreads
soulthreads / ShadertoyFFT.md
Last active January 8, 2026 17:10
Some details on Shadertoy FFT

Shadertoy exposes audio through a 512x2 texture, where the first row is the spectrum, and second row is wave data.

Pixel format is GL_RED GL_UNSIGNED_BYTE, meaning that each pixel contains only one 8-bit channel.

According to this shader from iq the audio in the browser is supposed to have a samplerate of 48kHz, but as it turns out, that's not the case: most likely it will be in 44.1kHz.

@matthewzring
matthewzring / markdown-text-101.md
Last active January 8, 2026 17:04
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@qpwo
qpwo / monte_carlo_tree_search.py
Last active January 8, 2026 17:03
Monte Carlo tree search (MCTS) minimal implementation in Python 3, with a tic-tac-toe example gameplay
"""
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3
Luke Harold Miles, July 2019, Public Domain Dedication
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1
"""
from abc import ABC, abstractmethod
from collections import defaultdict
import math
@bouroo
bouroo / docker-compose.yaml
Last active January 8, 2026 17:03
pgcat and postgresql replication with docker compose
# Environment variables for PostgreSQL containers
x-default-pg-env: &default-pg-env
# Set the timezone to Asia/Bangkok
TZ: Asia/Bangkok
# Username for the PostgreSQL administrative account
POSTGRESQL_USERNAME: postgres
# Name of the default PostgreSQL database
POSTGRESQL_DATABASE: postgres
# Password for the PostgreSQL administrative account
POSTGRESQL_PASSWORD: mysecretpassword
@rooroodev
rooroodev / warp-ffxiv.md
Last active January 8, 2026 17:02
Using Cloudflare WARP with FFXIV in NA

Using Cloudflare WARP with FFXIV in NA

Jan 1st, 2026, FFXIV 7.4

This is a short guide on how to use free VPN/VPN-like services to avoid NTT-related disconnects, notably Cloudflare WARP and ProtonVPN.

How did we get here?

Over the past few years, FFXIV has had a problem with severe lag or spontaneous disconnects that comes and goes, specifically in the NA region. Some blame DDoS, NTT, Square Enix, or all of the above. Either way this has been a thorn in the side of FFXIV gamers for a long time and investigations have shown that players can mitigate these issues with some VPNs. Cloudflare WARP is a known free option that people find a lot of success with.

Getting Started

Getting started with WARP is simple:

@Balthazzahr
Balthazzahr / gist:afd01f051f5131873a16af5e998c176c
Created January 8, 2026 03:25
System Monitoring Waybar Module (Python Script)
#!/usr/bin/env python3
# SYS-MON MODULE
# Snapshot: 20
# Version: 1.90
# Status: Stable
import json
import psutil
import subprocess
import re
@levelsio
levelsio / πŸ’β€β™€οΈ Karen Bot by @levelsio
Last active January 8, 2026 16:51
πŸ’β€β™€οΈ Karen Bot is an AI robot that lets you report problems in your neighborhood or city to your local city council
<?php
// Karen Bot by @levelsio
//
// ask Claude Code or Cursor to adapt it to your city
// mine is for Lisbon in Portuguese but it should work with any city and any language!
// save it as council.php and add a Nginx route /council on your server to use it
// make sure to add /council?key= and set a key below to use it privately
//
// more info: https://x.com/levelsio/status/2009011216132526407?s=20
@stenuto
stenuto / convert.sh
Created May 29, 2024 03:45
Convert video file into HLS playlist with multiple resolutions and bitrates
#!/bin/bash
# This script takes a video file as input and converts it into an HLS (HTTP Live Streaming) playlist with multiple resolutions and bitrates. It also generates a thumbnail image from the video.
# Check if an input filename is provided
if [ -z "$1" ]; then
echo "Usage: $0 input_filename (without extension) [-t]"
exit 1
fi